<?php

use think\migration\Seeder;

class SectionTableSeeder extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $rows = [];
        for($i = 1; $i <= 15; $i ++){

            $rows[] = [
                        'user_id' => 1,
                        'chapter_id' => $i,
                        'title' => '小节标题---' . $i,
                        'content' => '小节测试数据-----' . $i,
                        'create_time' => date('Y-m-d H:i:s'),
                        'update_time' => date('Y-m-d H:i:s'),
                    ];
        }
        
        $this->table('section')->insert($rows)->save();
    }
}